﻿#include "DxLib.h"
#include "GraphHandle.h"

static int GraphHandle[NUM][MAXMHANDLE];


int GraphHandleInit(int place)
 {
	 int i=0;
	 int j=0;

	 switch(place){

		 case MENU:

			 for(i=0;i<MAXMHANDLE;i++){

				 switch(i){

					case GH_Back:

						GraphHandle[place][i]= LoadGraph("dat/画像/backgraund.png");
						break;

					case GH_Title: 
						
						GraphHandle[place][i]=LoadGraph("dat/画像/title.png");
						break;

					case SH_Pika_n:

						GraphHandle[place][i]=LoadSoundMem("dat/音/pika-n.wav");
						break;

					case SH_Main:

						GraphHandle[place][i]=LoadSoundMem("dat/音/title.ogg");
						break;

					case SH_Click:

						GraphHandle[place][i]=LoadSoundMem("dat/音/click.wav");
						break;

					case SH_Select:

						GraphHandle[place][i]= LoadSoundMem("dat/音/select.ogg");
						break;

					case GH_Menu:

						GraphHandle[place][i]= LoadGraph("dat/画像/menuback.png");
						break;

				 }

			 }

			 return 0;

		 case COMMON:

			 for(i=0;i<MAXCHANDLE;i++){
				 
				 switch(i){
		 
						case GH_TETRI:
						
							GraphHandle[place][i]=LoadGraph("dat/画像/TETRI.png");
							break;
				 }
			 }
	 }

	 return 0;
}


//ハンドルを返す
int GetGraphHandle(int place , int Name)
{

	return GraphHandle[place][Name];
}